#include <stdio.h>
#include <signal.h>

int main(){
    int signs[]={SIGABRT,SIGFPE,SIGILL,SIGINT,SIGSEGV,SIGTERM};
    int i,n,sign;
    printf("Enter two integers: ");
    scanf("%d %d",&i,&n);
    sign=signs[i];
    if(n==0){
        signal(sign,SIG_DFL);
    }else if(n>0){
        signal(sign,SIG_IGN);
    }else{
        signal(sign,SIG_ERR);
    }
    raise(SIGINT);
    return 0;
}
